package com.hxs.hxsserver.domain.entity.device;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author liuchuan
 * @create 2024/9/26
 */

/**
 * 设备表
 */
@Data
@TableName("device")
public class Device {
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 设备IP地址
     */
    private String deviceIpAddr;

    /**
     * 设备端口
     */
    private String devicePort;

    /**
     * 设备状态，1是在线，0是离线
     */
    private Integer deviceStatus;

    /**
     * 心跳数据
     */
    private String heartbeatData;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 离线判断间隔, 单位分钟
     */
    private Integer offlineJudgmentInterval;

    /**
     * 保存数据间隔，单位 分钟
     */
    private Integer saveDataInterval;

    private Integer folderId;

    private Integer alarmUserId;

    private int sort;

    private String deviceGps;

    private String iccid;

    private String deviceHardwareAddr;

    /**
     * 设备名称
     */
    private String deviceName;

    private Date createTime;

    private Date updateTime;
    private int isDelete;

    @ApiModelProperty("最近一次上线时间")
    private Date lastOnlineTime;

    @ApiModelProperty("最近一次离线时间")
    private Date lastOfflineTime;

    public Device() {
    }

    public Device(String deviceIpAddr) {
        this.deviceIpAddr = deviceIpAddr;
    }
}